<?
//inculde即可以使用data数据。本页所有的data数据，倾在controller都处理好
include_once("../../../common/modules/checkA.php");
include_once("../../../../config.php");
include_once("../controller/plate-edit.php");
?>





<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <link href="../css/<? echo $theme_folder ?>/user.css" rel="stylesheet" type="text/css"/>
    <?php include ROOT_PATH_.'/controller/common/modules/head.php'; ?>
    <link href="../asset/css/member.css"      rel="stylesheet" type="text/css"/>

    <!--kindeditor编辑器-->
    <link rel="stylesheet" href="../../keditor/themes/default/default.css"/>
    <script charset="utf-8" src="../../keditor/kindeditor-all.js"></script>
    <script charset="utf-8" src="../../keditor/lang/zh_CN.js"></script>

    <script>
        var editor;

        KindEditor.ready(function (K) {
            editor4 = K.create('textarea[name="ai_agreement"]', {
                allowFileManager:true,
                afterBlur: function () { editor.sync(); },
                allowFileManager: true,
                filterMode : false,
            });

            editor4.options.filterMode = false;

        });

        KindEditor.ready(function (K) {
            editor4 = K.create('textarea[name="ai_leader_rules"]', {
                allowFileManager:true,
                afterBlur: function () { editor.sync(); },
                allowFileManager: true,
                filterMode : false,
            });

            editor4.options.filterMode = false;

        });

    </script>
</head>


<body>

<div id="topbar">     <?php include ROOT_PATH_.'/controller/common/modules/topbar.php'; ?> </div>


<div id="container" class="<? echo $system_part ?>">

    <div id="maincontent">

        <div id="sidebar">
            <?php include ROOT_PATH_.'/controller/common/modules/sidebar.php'; ?>
        </div>


<div id="content" class="layui-form">
<h1> 设置 </h1>




    <div class="detail-box  layui-form">

        <div class="detail-boxes">
            <form id="edit-member-form" method="post"
                  action="../controller/plate-edit-function.php"
                  enctype="multipart/form-data" class="layui-form detail-boxing">




                <div class="layui-form-item">
                    <label class="layui-form-label">客户标签</label>
                    <div class="layui-input-block">
                        <input type="text" name="ai_tag"   autocomplete="off" class="layui-input" value="<?echo $member_setting['tag']?>">
                        <div class="notice"> 每个标签请以分号分开,中英文分号均可。</div>
                    </div>
                </div>


<!--                <div class="layui-form-item">-->
<!--                    <label class="layui-form-label">用户评级</label>-->
<!--                    <div class="layui-input-block">-->
<!--                        <input type="text" name="ai_rank"   autocomplete="off" class="layui-input" value="--><?//echo $member_setting['rank']?><!--">-->
<!--                        <div class="notice"> 每个标签请以分号分开,中英文分号均可。</div>-->
<!--                    </div>-->
<!--                </div>-->



<!--                <div class="layui-form-item">-->
<!--                    <label class="layui-form-label">联系渠道</label>-->
<!--                    <div class="layui-input-block">-->
<!--                        <input type="text" name="ai_contact_way"   autocomplete="off" class="layui-input" value="--><?//echo $member_setting['contact_way']?><!--">-->
<!--                        <div class="notice"> 每个标签请以分号分开,中英文分号均可。</div>-->
<!--                    </div>-->
<!--                </div>-->


                <div class="layui-form-item">
                    <label class="layui-form-label">用户协议</label>
                    <div class="layui-input-block">
                        <textarea name="ai_agreement" style="width:800px;height:400px;visibility:hidden;"><?php echo $member_setting['agreement']?></textarea><em class="explain"></em>

                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">局长守则</label>
                    <div class="layui-input-block">
                        <textarea name="ai_leader_rules" style="width:800px;height:400px;visibility:hidden;"><?php echo $member_setting['leader_rules']?></textarea><em class="explain"></em>

                    </div>
                </div>




                <input type="hidden" name="nid" value="<? echo $member_setting['nid']?>">
                <input name="sys_part"  type="hidden"  value="<? echo $_REQUEST['sys_part'] ?>"/>


                <div class="function">
                    <div class="layui-input-block">
                        <button class="layui-btn" lay-submit lay-filter="formMemberAdd" type="submit">立即提交</button>
                        <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                    </div>
                </div>



            </form>
        </div>
    </div>





<!--content端點01-->
</div>
<!--maincontent端點01-->
<br class="clearfloat"/>
</div>
<!--container端點01-->
</div>


<?php include_once('../module/footer.php'); ?> </body>


<script>
layui.use('upload', function(){
    var $ = layui.jquery
        ,upload = layui.upload;

    //普通图片上传
    var uploadInst = upload.render({
        elem: '#test1'
        ,url: 'https://httpbin.org/post' //改成您自己的上传接口
        ,accept: 'file' //普通文件
        ,exts: 'jpg|jpeg|png|gif' //只允许上传压缩文件
        ,size: 60 //限制文件大小，单位 KB
        ,before: function(obj){
            //预读本地文件示例，不支持ie8
            obj.preview(function(index, file, result){
                $('#demo1').attr('src', result); //图片链接（base64）
            });
        }
        ,done: function(res){
            //如果上传失败
            if(res.code > 0){
                return layer.msg('上传失败');
            }
            //上传成功
        }
        ,error: function(){
            //演示失败状态，并实现重传
            var demoText = $('#demoText');
            demoText.html('<span style="color: #FF5722;">上传失败</span> <a class="layui-btn layui-btn-xs demo-reload">重试</a>');
            demoText.find('.demo-reload').on('click', function(){
                uploadInst.upload();
            });
        }
    });




});
</script>


</html>
